package com.caiyouxi.goods.controller;

import com.caiyouxi.common.bean.ResData;
import com.caiyouxi.common.control.BaseController;
import com.caiyouxi.goods.model.GoodsDeliverService;
import com.caiyouxi.goods.service.GoodsDeliverServiceService;
import com.caiyouxi.order.model.OrderBean;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Created by Administrator on 2017/11/9.
 */

@RestController
@RequestMapping("/boss/goods_deliver_service")
public class GoodsDeliverServiceController  extends BaseController{

    private Logger logger = Logger.getLogger(GoodsDeliverServiceController.class);

    @Autowired
    private GoodsDeliverServiceService goodsDeliverServiceService;

    /**
     * 查询商品发货服务
     */
    @RequestMapping("get_goods_deliver_service_info")
    public ResData get_goods_deliver_service_info(HttpServletRequest request, HttpServletResponse response, @RequestBody GoodsDeliverService goodsDeliverService){
        logger.info("=============================== 查询商品发货服务 ================================");
        return goodsDeliverServiceService.get_goods_deliver_service_info(goodsDeliverService);
    }

    /**
     * 查询商品发货服务列表
     */
    @RequestMapping("/get_goods_deliver_service_list")
    public ResData get_goods_deliver_service_list(HttpServletRequest request,HttpServletResponse response,@RequestBody GoodsDeliverService goodsDeliverService){
        logger.info("=============================== 查询商品发货服务列表================================");
        return goodsDeliverServiceService.get_goods_deliver_service_list(goodsDeliverService);
    }

    /**
     * 新增商品发货服务
     */
    @RequestMapping("add_goods_deliver_service")
    public ResData add_goods_deliver_service(HttpServletRequest request,HttpServletResponse response,@RequestBody GoodsDeliverService goodsDeliverService){
        logger.info("=============================== 新增商品发货服务 ================================");
        return goodsDeliverServiceService.add_goods_deliver_service(goodsDeliverService);
    }

    /**
     * 修改商品发货服务
     */
    @RequestMapping("update_goods_deliver_service")
    public ResData update_goods_deliver_service(HttpServletRequest request,HttpServletResponse response,@RequestBody GoodsDeliverService goodsDeliverService){
        logger.info("=============================== 修改商品发货服务 ================================");
        return  goodsDeliverServiceService.update_goods_deliver_service(goodsDeliverService);
    }

    /**
     * 删除商品发货服务
     */
    @RequestMapping("delete_goods_deliver_service")
    public ResData delete_goods_deliver_service(HttpServletRequest request,HttpServletResponse response,@RequestBody GoodsDeliverService goodsDeliverService){
        logger.info("=============================== 删除商品发货服务 ================================");
        return goodsDeliverServiceService.delete_goods_deliver_service(goodsDeliverService) ;
    }


}
